\doxysection{C\+:/\+Users/\+ASUS/\+Desktop/dm-\/ctrl\+H7-\/balance-\/9025test/\+Core/\+Src/stm32h7xx\+\_\+hal\+\_\+timebase\+\_\+tim.c File Reference}
\hypertarget{stm32h7xx__hal__timebase__tim_8c}{}\label{stm32h7xx__hal__timebase__tim_8c}\index{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Core/Src/stm32h7xx\_hal\_timebase\_tim.c@{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Core/Src/stm32h7xx\_hal\_timebase\_tim.c}}


HAL time base based on the hardware TIM.  


{\ttfamily \#include "{}stm32h7xx\+\_\+hal.\+h"{}}\newline
{\ttfamily \#include "{}stm32h7xx\+\_\+hal\+\_\+tim.\+h"{}}\newline
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{stm32h7xx__hal__def_8h_a63c0679d1cb8b8c684fbb0632743478f}{HAL\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{stm32h7xx__hal__timebase__tim_8c_ga879cdb21ef051eb81ec51c18147397d5}{HAL\+\_\+\+Init\+Tick}} (uint32\+\_\+t Tick\+Priority)
\begin{DoxyCompactList}\small\item\em This function configures the TIM2 as a time base source. The time source is configured to have 1ms time base with a dedicated Tick interrupt priority. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group___h_a_l___exported___functions_gaaf651af2afe688a991c657f64f8fa5f9}{HAL\+\_\+\+Suspend\+Tick}} (void)
\begin{DoxyCompactList}\small\item\em Suspend Tick increment. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group___h_a_l___exported___functions_ga24e0ee9dae1ec0f9d19200f5575ff790}{HAL\+\_\+\+Resume\+Tick}} (void)
\begin{DoxyCompactList}\small\item\em Resume Tick increment. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{stm32h7xx__hal__timebase__tim_8c_a2c80fd5510e2990a59a5c90d745c716c}\label{stm32h7xx__hal__timebase__tim_8c_a2c80fd5510e2990a59a5c90d745c716c} 
\mbox{\hyperlink{struct_t_i_m___handle_type_def}{TIM\+\_\+\+Handle\+Type\+Def}} {\bfseries htim2}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
HAL time base based on the hardware TIM. 

\begin{DoxyAttention}{Attention}

\end{DoxyAttention}
Copyright (c) 2024 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-\/\+IS. 

\label{doc-func-members}
\Hypertarget{stm32h7xx__hal__timebase__tim_8c_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{stm32h7xx__hal__timebase__tim_8c_ga879cdb21ef051eb81ec51c18147397d5}\index{stm32h7xx\_hal\_timebase\_tim.c@{stm32h7xx\_hal\_timebase\_tim.c}!HAL\_InitTick@{HAL\_InitTick}}
\index{HAL\_InitTick@{HAL\_InitTick}!stm32h7xx\_hal\_timebase\_tim.c@{stm32h7xx\_hal\_timebase\_tim.c}}
\doxysubsubsection{\texorpdfstring{HAL\_InitTick()}{HAL\_InitTick()}}
{\footnotesize\ttfamily \label{stm32h7xx__hal__timebase__tim_8c_ga879cdb21ef051eb81ec51c18147397d5} 
\+\_\+\+\_\+weak \mbox{\hyperlink{stm32h7xx__hal__def_8h_a63c0679d1cb8b8c684fbb0632743478f}{HAL\+\_\+\+Status\+Type\+Def}} HAL\+\_\+\+Init\+Tick (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{Tick\+Priority}{}\end{DoxyParamCaption})}



This function configures the TIM2 as a time base source. The time source is configured to have 1ms time base with a dedicated Tick interrupt priority. 

This function configures the source of the time base. The time source is configured to have 1ms time base with a dedicated Tick interrupt priority.

\begin{DoxyNote}{Note}
This function is called automatically at the beginning of program after reset by \doxylink{group___h_a_l___group1_gaecac54d350c3730e6831eb404e557dc4}{HAL\+\_\+\+Init()} or at any time when clock is configured, by HAL\+\_\+\+RCC\+\_\+\+Clock\+Config(). 
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em Tick\+Priority} & Tick interrupt priority. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em HAL} & status\\
\hline
\end{DoxyRetVals}
\begin{DoxyNote}{Note}
This function is called automatically at the beginning of program after reset by \doxylink{group___h_a_l___group1_gaecac54d350c3730e6831eb404e557dc4}{HAL\+\_\+\+Init()} or at any time when clock is reconfigured by HAL\+\_\+\+RCC\+\_\+\+Clock\+Config(). 

In the default implementation, Sys\+Tick timer is the source of time base. It is used to generate interrupts at regular time intervals. Care must be taken if \doxylink{group___h_a_l___group2_gab1dc1e6b438daacfe38a312a90221330}{HAL\+\_\+\+Delay()} is called from a peripheral ISR process, the Sys\+Tick interrupt must have higher priority (numerically lower) than the peripheral interrupt. Otherwise the caller ISR process will be blocked. The function is declared as \+\_\+\+\_\+weak to be overwritten in case of other implementation in user file. 
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em Tick\+Priority} & Tick interrupt priority. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em HAL} & status \\
\hline
\end{DoxyRetVals}
